package com.dianjing.dianqun.service.dianpai;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.dianjing.dianqun.common.base.CrudService;
import com.dianjing.dianqun.dao.dianpai.DianPaiCollectionMapper;
import com.dianjing.dianqun.model.DianPaiCollection;

/**
 * @date : 2017年10月25日
 * 
 * @author: baoyongtao
 * 
 * @see :
 * 
 */
@Service
@Transactional
public class DianPaiCollectionService extends CrudService<DianPaiCollectionMapper, DianPaiCollection> {
	@Autowired
	DianPaiCollectionMapper collectionMapper;
	
	
	/**
	 * 取消收藏
	 * 
	 * @param userId
	 * @param contentId
	 */
	@Transactional(readOnly=false)
	public void cancelCollection(Integer userId, Integer contentId) {
		collectionMapper.cancelCollection(userId, contentId);
	}


	public DianPaiCollection selectByPrimaryKey(Integer userId, Integer contentId) {
		return collectionMapper.selectByPrimaryKey(userId,contentId);
	}
	 
}
